Skip to content

block: rename message to block in SignedBlock#465

Merged
tcoratger merged 1 commit intoleanEthereum:mainfrom
tcoratger:SignedBlock-block
Mar 22, 2026
Merged

block: rename message to block in SignedBlock#465
tcoratger merged 1 commit intoleanEthereum:mainfrom
tcoratger:SignedBlock-block

Conversation

@tcoratger
Copy link
Collaborator

🗒️ Description

I feel like this is more natural, what do you think @anshalshukla ?

🔗 Related Issues or PRs

✅ Checklist

  • Ran tox checks to avoid unnecessary CI fails:
    uvx tox
  • Considered adding appropriate tests for the changes.
  • Considered updating the online docs in the ./docs/ directory.

@tcoratger tcoratger merged commit 38c74e5 into leanEthereum:main Mar 22, 2026
12 checks passed
@unnawut unnawut added this to the pq-devnet-4 milestone Mar 23, 2026
@unnawut unnawut added the specs Scope: Changes to the specifications label Mar 23, 2026
pablodeymo added a commit to lambdaclass/ethlambda that referenced this pull request Mar 25, 2026
Aligns with leanEthereum/leanSpec#465 which renamed SignedBlock.message
to SignedBlock.block. SSZ compatibility is unaffected since SSZ is
schemaless; this is purely a naming convention change to keep all client
implementations consistent with the spec.
MegaRedHand pushed a commit to lambdaclass/ethlambda that referenced this pull request Mar 25, 2026
…#250)

## Motivation

[leanSpec#465](leanEthereum/leanSpec#465)
renamed the `SignedBlock` container field from `message` to `block`. As
noted in that PR:

> This PR changes the ssz container field name from SignedBlock.message
to SignedBlock.block. It doesn't affect ssz compatibility because ssz is
schemaless, but I believe we rely on the same container namings across
all client impls, so it will be hard to sync specs vs impls if not
renamed.

This PR makes the corresponding rename in ethlambda to stay aligned with
the spec and other client implementations.

## Changes

Renamed `SignedBlockWithAttestation.message` →
`SignedBlockWithAttestation.block` across 9 files (39 insertions, 40
deletions):

### Core type definition
- **`crates/common/types/src/block.rs`**: Renamed the struct field,
updated the manual `Debug` impl, `from_signed_block()`,
`to_signed_block()`, and doc comments that referenced `message`.

### Blockchain crate
- **`crates/blockchain/src/lib.rs`**: Updated block construction in
`propose_block()`, field access in `process_or_pend_block()`, and
pending block cascade in `process_pending_children()`.
- **`crates/blockchain/src/store.rs`**: Updated `on_block_core()` (block
extraction and cloning), `verify_signatures()` (block and proposer
attestation access), and a test helper struct construction.

### Storage crate
- **`crates/storage/src/store.rs`**: Updated the destructuring pattern
in `write_signed_block()`.

### Networking crate
- **`crates/net/p2p/src/gossipsub/handler.rs`**: Updated all 10 field
accesses in `handle_gossipsub_message()` (block receive logging) and
`publish_block()` (block publish logging).
- **`crates/net/p2p/src/req_resp/handlers.rs`**: Updated block root
computation in `handle_blocks_by_root_response()`.

### Test files
- **`crates/blockchain/tests/forkchoice_spectests.rs`**: Updated
`build_signed_block()` construction and slot access.
- **`crates/blockchain/tests/signature_spectests.rs`**: Updated slot
access for block timing.
- **`crates/blockchain/tests/signature_types.rs`**: Updated local
variable name and struct construction in
`From<TestSignedBlockWithAttestation>` impl.

### Not changed
- **`TestSignedBlockWithAttestation.message`** (in
`signature_types.rs`): This test deserialization type still uses
`message` to match the current YAML test fixture field names. It will
need updating when `LEAN_SPEC_COMMIT_HASH` is bumped to a commit that
includes leanSpec#465.

## Notes

- **SSZ compatibility**: SSZ is schemaless, so this rename has zero
impact on wire format or cross-client interop.
- **No behavioral changes**: This is a pure rename — no logic was added,
removed, or modified.
- The resulting access pattern `signed_block.block.block` (outer
`.block` is `BlockWithAttestation`, inner `.block` is `Block`) is
slightly redundant but matches the spec structure.

## How to Test

```bash
make fmt    # ✅ passes
make lint   # ✅ passes
make test   # ✅ passes
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

specs Scope: Changes to the specifications

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants